<?php if(count($comments) > 1): ?>
	<?php foreach($comments as $comment): ?>
		<div><?php echo $comment; ?></div>
	<?php endforeach; ?>
<?php endif; ?>

<?php if(isset($formErrors)): ?>
	<?php foreach($formErrors as $error): ?>
	<div><?php echo $error; ?></div>
	<?php endforeach; ?>
<?php endif; ?>

<?php if(isset($formMessages)): ?>
	<?php foreach($formMessages as $message): ?>
	<div><?php echo $message; ?></div>
	<?php endforeach; ?>
<?php endif; ?>

<?php echo form_open_multipart("home/submitComment"); ?>
	
	<?php echo form_hidden("itemId",$item->id); ?>
	<br />
	Name : <?php echo form_input("name"); ?>
	<br />
	Email : <?php echo form_input("email"); ?>
	<br />
	Comment : <?php echo form_textarea("comment"); ?>
	<br />
	Captcha : <img style='cursor: pointer;' onclick='this.src += "/0";' src="<?php echo site_url("home/captcha"); ?>" />
	<?php echo form_input("captcha"); ?>
	<br />
	<?php echo form_submit("submit","Submit"); ?>
	
<?php echo form_close(); ?>